<?php 
$db['scoreapply'] = array(
    'columns'=>array(
        'id'=>array(
            'type'=>'mediumint(8)',
            'extra'=>'auto_increment',
            'pkey'=>'true',
            'label'=>__('序号'),
        ),
        'gid'=>array(
            'type'=>'table:goods@b2c',
            'required'=>true,
            'label'=>__('活动商品名称'),
            'editable'=>false,
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'cat_id'=>array(
            'type'=>'table:goods_cat@b2c',
            'required'=>true,
            'label'=>__('商品分类'),
            'editable'=>false,
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'aid'=>array(
            'type'=>'table:activity@scorebuy',
            'required'=>true,
            'label'=>__('所属活动'),
            'editable'=>false,
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'member_id'=>array(
            'type'=>'table:account@pam',
            'required'=>true,
            'label'=>__('申请商家'),
            'editable'=>false,
            'locked' => 1,
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'store_id'=>array(
            'type'=>'table:storemanger@business',
            'required'=>true,
            'label'=>__('店铺名称'),
            'editable'=>false,
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'price'=>array(
            'type'=>'money',
            'default'=>0,
            'label'=>__('商家参与价格'),
            'editable'=>false,
            'hidden'=>true,
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'last_price'=>array(
            'type'=>'money',
            'default'=>0,
            'label'=>__('最终活动价格'),
            'editable'=>false,
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'score' => 
        array (
          'type' => 'number',
          'label' => '积分',
          'width' => 30,
          'editable' => false,
          'in_list' => true,
          'default_in_list'=>true,
        ),
        'isMemLv'=>array(
            'type'=>array(
                0=>__('未开启'),
                1=>__('开启'),
            ),
            'default'=>0,
            'label'=>__('是否开启会员等级积分'),
            'editable'=>false,
            'in_list'=>true,
            'default_in_list' => true,
        ),
        'nums' => array(
            'type'=>'mediumint(8)',
            'label'=>__('参加活动的商品数量'),
            'default'=>'0',
            'editable'=>false,
            'filtertype'=>'number',
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'remainnums'=>array(
            'type'=>'mediumint(8)',
            'label'=>__('参加活动的剩余商品数量'),
            'default'=>'0',
            'editable'=>false,
            'filtertype'=>'number',
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'personlimit'=>array(
            'type'=>'mediumint(8)',
            'label'=>__('每人限购'),
            'editable'=>false,
            'filtertype'=>'number',
            'in_list'=>true,
            'default_in_list'=>true,
        ),
        'status'=>array(
            'type'=>array(
                1=>__('待审核'),
                2=>__('审核通过'),
                3=>__('审核不通过'),
            ),
            'default'=>'1',
            'label'=>__('活动状态'),
            'editable'=>false,
            'in_list'=>true,
            'default_in_list' => true,
        ),
        'remark'=>array(
           'type'=>'varchar(255)',
           'label'=>__('备注'),
           'editable'=>false,
           'in_list'=>true,
           'default_in_list' => true,
        ),
        'image_codeid' => 
            array (
              'type' => 'varchar(32)',
              'label' => '活动广告图片',
              'width' => 75,
              'hidden' => true,
              'editable' => false,
              'in_list' => false,
            ),
        'last_midifity'=>array(
            'type' => 'time',
            'label'=>__('最后修改时间'),
            'editable' => false,
            'required' => false
        ),
    ),

);